{% for task in tasks|default() %}
  
  <li class="task-manage-item js-task-manage-item drag clearfix {% if task.isOptional %}js-optional-task{% endif %}" id="task-{{ task.id }}" >
    <div class="item-content js-item-content text-overflow">
      {% include 'lesson-manage/normal/task-content.html.twig' with {task: task, taskNum: loop.index, displayAllInfo: true, isShowText: false} %}
    </div>
    <div class="item-actions">
      <a class="cd-mr24" data-role='update-task' href="javascript:;" data-toggle="modal" data-target="#modal" data-url="{{ path('course_manage_task_update', {id:task.id,courseId:task.courseId}) }}">
        <i class="es-icon es-icon-edit" data-toggle="tooltip" title="{{ 'course.plan_task.activity_manage.modify'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)}) }}" data-placement="top"></i>
      </a>
      <a class="cd-mr24" href="{{ path('course_task_show', {id:task.id,courseId:task.courseId,preview:1}) }}" target="_blank">
        <i class="es-icon es-icon-removeredeye" data-toggle="tooltip" title="{{ 'course.plan_task.activity_manage.preview'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)}) }}" data-placement="top"></i>
      </a>
      
      <div class="cd-dropdown" data-toggle="cd-dropdown" data-trigger="hover">
        <a  class="cd-link-assist" href="javascript:;">
          <i class="es-icon es-icon-morehoriz"></i>
        </a>
        <ul class="dropdown-menu task-manage-item__dropdown">
          <li>
            <a class='js-delete' href="javascript:;" data-type="task" data-url="{{ path('course_manage_task_delete', {taskId:task.id,courseId:task.courseId}) }}" data-name="{{ setting('course.task_name')|default('admin.setting_course.task'|trans) }}">
              {{'course.plan_task.delete_btn'|trans}}{{ setting('course.task_name')|default('admin.setting_course.task'|trans) }}
            </a>
          </li>
          {% include 'lesson-manage/common/marker-manage-btn.html.twig' with {course: course, task: task} %}
          {{ slot('task.menu.extension', {'task': task}) }}
        </ul>
      </div>
    </div>
  </li>
{% endfor %}
